#include <stdio.h>
#include <pthread.h>
#include <unistd.h>

int count = 0;
void *Routine(void *arg){
    while(1){
        count++;
        sleep(1);
    }
    pthread_exit((void*)0);
}

int main(){
    pthread_t pid;
    pthread_create(&pid,NULL,Routine,NULL);
    while(1){
        printf("count:%d\n",count);
        sleep(1);
    }
    pthread_join(pid,NULL);
    return 0;
}